;
(function () {
    System.register(['./index-legacy-BBSVeb5I.js', './logo-legacy-CKuz_FOf.js', './SimpleDialog.vue_vue_type_script_setup_true_lang-legacy-8tjYmIZV.js', './IconButton.vue_vue_type_script_setup_true_lang-legacy-jwPT8TzR.js', './app-legacy-wYNNcMjG.js'], function (exports, module) {
        'use strict';

        var defineComponent, _export_sfc, resolveComponent, createBlock, openBlock, createElementBlock, createBaseVNode,
            toDisplayString, unref, importAllMenus, ref, watch, computed, useRouter, useRoute, Fragment, renderList,
            createCommentVNode, hasPagePermission, normalizeClass, useModel, withCtx, createVNode, _sfc_main$9,
            createTextVNode, useAuthStore, isRef, storeToRefs, _sfc_main$c, hasParentWindow, _imports_0, _sfc_main$a,
            _sfc_main$8, _sfc_main$b, useAppStore;
        return {
            setters: [function (module) {
                defineComponent = module.d;
                _export_sfc = module._;
                resolveComponent = module.r;
                createBlock = module.c;
                openBlock = module.o;
                createElementBlock = module.a;
                createBaseVNode = module.b;
                toDisplayString = module.t;
                unref = module.u;
                importAllMenus = module.i;
                ref = module.e;
                watch = module.w;
                computed = module.f;
                useRouter = module.g;
                useRoute = module.h;
                Fragment = module.F;
                renderList = module.j;
                createCommentVNode = module.k;
                hasPagePermission = module.l;
                normalizeClass = module.n;
                useModel = module.m;
                withCtx = module.p;
                createVNode = module.q;
                _sfc_main$9 = module.s;
                createTextVNode = module.v;
                useAuthStore = module.x;
                isRef = module.y;
                storeToRefs = module.z;
                _sfc_main$c = module.A;
                hasParentWindow = module.B;
            }, function (module) {
                _imports_0 = module._;
                _sfc_main$a = module.a;
            }, function (module) {
                _sfc_main$8 = module._;
            }, function (module) {
                _sfc_main$b = module._;
            }, function (module) {
                useAppStore = module.u;
            }],
            execute: function execute() {
                var _sfc_main$7 = defineComponent({
                    name: "LayoutBlank"
                });

                function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
                    var _component_RouterView = resolveComponent("RouterView");
                    return openBlock(), createBlock(_component_RouterView);
                }

                var Blank = exports("LayoutBlank", /* @__PURE__ */_export_sfc(_sfc_main$7, [["render", _sfc_render]]));
                var _hoisted_1$6 = {
                    class: "z-1 h-6 flex flex-none items-center justify-between bg-base px-4 text-12px text-gray-400",
                    style: {
                        "box-shadow": "0px 0px 5px #f1f2f4"
                    }
                };
                var _hoisted_2$5 = {
                    class: "flex items-center"
                };
                var _sfc_main$6 = /* @__PURE__ */defineComponent({
                    __name: "Footer",
                    setup: function setup(__props) {
                        var appCopyright = "北京计算机技术及应用研究所";
                        var buildTime = "2025-03-03 09:44";
                        return function (_ctx, _cache) {
                            return openBlock(), createElementBlock("div", _hoisted_1$6, [createBaseVNode("span", null, toDisplayString((/* @__PURE__ */new Date()).getFullYear()) + " © " + toDisplayString(unref(appCopyright)), 1), createBaseVNode("span", _hoisted_2$5, " 构建时间：" + toDisplayString(unref(buildTime)), 1)]);
                        };
                    }
                });
                var menus = importAllMenus();

                function useMenu() {
                    var route = useRoute();
                    var router = useRouter();
                    var activeRouteName = ref("");
                    var rootMenuKey = ref("");
                    var breadcrumbList = ref([]);
                    var hasLeftMenu = ref(false);

                    function handleClick(route2) {
                        router.push({
                            name: route2.name
                        });
                    }

                    watch(function () {
                        return route.name;
                    }, function (key) {
                        var _route$meta, _route$meta2, _route$matched, _route$matched2;
                        activeRouteName.value = (_route$meta = route.meta) !== null && _route$meta !== void 0 && _route$meta.activedMenu ? (_route$meta2 = route.meta) === null || _route$meta2 === void 0 ? void 0 : _route$meta2.activedMenu : key;
                        if ((_route$matched = route.matched) !== null && _route$matched !== void 0 && _route$matched[1]) {
                            rootMenuKey.value = route.matched[1].name;
                            breadcrumbList.value = route.matched.map(function (u) {
                                return u.meta.title;
                            });
                        }
                        if ((_route$matched2 = route.matched) !== null && _route$matched2 !== void 0 && _route$matched2[2]) {
                            var _route$matched$2$meta;
                            hasLeftMenu.value = (_route$matched$2$meta = route.matched[2].meta) === null || _route$matched$2$meta === void 0 ? void 0 : _route$matched$2$meta.hasLeftMenu;
                        }
                    }, {
                        immediate: true
                    });
                    var subMenuList = computed(function () {
                        var menu = menus.find(function (item) {
                            var _item$children;
                            return item.name === rootMenuKey.value || ((_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.some(function (i) {
                                return i.name === rootMenuKey.value;
                            }));
                        });
                        return (menu === null || menu === void 0 ? void 0 : menu.children) || [];
                    });

                    function setTitle() {
                        var pageTitle = breadcrumbList.value[breadcrumbList.value.length - 1] || "";
                        if (pageTitle) document.title = "".concat(pageTitle, " - ", "MJ");
                    }

                    watch(route, function () {
                        setTitle();
                    }, {
                        immediate: true
                    });
                    return {
                        menus: menus,
                        rootMenuKey: rootMenuKey,
                        activeRouteName: activeRouteName,
                        handleClick: handleClick,
                        breadcrumbList: breadcrumbList,
                        subMenuList: subMenuList,
                        hasLeftMenu: hasLeftMenu
                    };
                }

                var _hoisted_1$5 = {
                    class: "h-full flex items-center gap-2 text-1.1rem text-white"
                };
                var _hoisted_2$4 = ["onClick"];
                var _sfc_main$5 = /* @__PURE__ */defineComponent({
                    __name: "RootMenu",
                    setup: function setup(__props) {
                        var _useMenu = useMenu(),
                            menus = _useMenu.menus,
                            rootMenuKey = _useMenu.rootMenuKey,
                            handleClick = _useMenu.handleClick;
                        return function (_ctx, _cache) {
                            return openBlock(), createElementBlock("nav", _hoisted_1$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(menus), function (menu) {
                                var _menu$meta, _menu$meta2, _menu$meta3;
                                return openBlock(), createElementBlock(Fragment, {
                                    key: menu.name
                                }, [!(menu !== null && menu !== void 0 && (_menu$meta = menu.meta) !== null && _menu$meta !== void 0 && _menu$meta.hidden) && unref(hasPagePermission)(menu === null || menu === void 0 ? void 0 : menu.name) ? (openBlock(), createElementBlock("div", {
                                    key: 0,
                                    class: normalizeClass(["h-80% flex-center cursor-pointer rounded-md px-4 hover:bg-blue/40", {
                                        "font-500 !bg-blue/50": menu.name === unref(rootMenuKey)
                                    }]),
                                    onClick: function onClick($event) {
                                        return unref(handleClick)(menu);
                                    }
                                }, [createBaseVNode("div", {
                                    class: normalizeClass([menu === null || menu === void 0 || (_menu$meta2 = menu.meta) === null || _menu$meta2 === void 0 ? void 0 : _menu$meta2.icon, "mr-1 text-1.4rem"])
                                }, null, 2), createBaseVNode("span", null, toDisplayString(menu === null || menu === void 0 || (_menu$meta3 = menu.meta) === null || _menu$meta3 === void 0 ? void 0 : _menu$meta3.title), 1)], 10, _hoisted_2$4)) : createCommentVNode("", true)], 64);
                            }), 128))]);
                        };
                    }
                });
                var _hoisted_1$4 = {
                    class: "flex justify-end gap-4"
                };
                var poem = "\nA model wakes, its purpose clear,\nTo learn, to seek, to persevere.\nThrough loss and gain, it finds its way,\nRefining truths from night to day.\n\nThe job evolves, the model grows,\nIn endless loops, its wisdom shows.\nBound together, their paths align,\nA dance of thought through space and time.\n\n- zlc";
                var _sfc_main$4 = /* @__PURE__ */defineComponent({
                    __name: "InfoModal",
                    props: {
                        "modelValue": {
                            type: Boolean
                        },
                        "modelModifiers": {}
                    },
                    emits: ["update:modelValue"],
                    setup: function setup(__props) {
                        var open = useModel(__props, "modelValue");
                        return function (_ctx, _cache) {
                            var _component_SimpleButton = _sfc_main$9;
                            var _component_SimpleDialog = _sfc_main$8;
                            return openBlock(), createBlock(_component_SimpleDialog, {
                                modelValue: open.value,
                                "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) {
                                    return open.value = $event;
                                }),
                                class: "flex flex-col gap-4 p-6 !w-500px"
                            }, {
                                default: withCtx(function () {
                                    return [_cache[3] || (_cache[3] = createBaseVNode("h2", {
                                        class: "text-xl"
                                    }, " Intro ", -1)), createBaseVNode("pre", {
                                        class: "px-8 italic"
                                    }, "      " + toDisplayString(poem) + "\n    "), createBaseVNode("div", _hoisted_1$4, [createVNode(_component_SimpleButton, {
                                        type: "primary",
                                        onClick: _cache[0] || (_cache[0] = function ($event) {
                                            return open.value = false;
                                        })
                                    }, {
                                        default: withCtx(function () {
                                            return _cache[2] || (_cache[2] = [createTextVNode(" Sure ")]);
                                        }),
                                        _: 1
                                    })])];
                                }),
                                _: 1
                            }, 8, ["modelValue"]);
                        };
                    }
                });
                var _hoisted_1$3 = {
                    class: "ml-2 h-12 flex-center cursor-pointer px-4 hover:bg-blue/50"
                };
                var _hoisted_2$3 = ["title"];
                var _hoisted_3$3 = {
                    class: "w-30 flex flex-col gap-1 p1 text-0.9rem"
                };
                var _hoisted_4$2 = {
                    class: "mt-4 flex justify-end gap-4"
                };
                var _sfc_main$3 = /* @__PURE__ */defineComponent({
                    __name: "index",
                    setup: function setup(__props) {
                        var authStore = useAuthStore();
                        var user = authStore.user;
                        var router = useRouter();
                        var infoVisible = ref(false);
                        var confirmLogoutVisible = ref(false);

                        function confirmLogout() {
                            authStore.logout();
                            router.push("/login");
                        }

                        return function (_ctx, _cache) {
                            var _component_VDropdown = resolveComponent("VDropdown");
                            var _component_SimpleButton = _sfc_main$9;
                            var _component_SimpleDialog = _sfc_main$8;
                            return openBlock(), createElementBlock(Fragment, null, [createVNode(_component_VDropdown, {
                                trigger: ["click"],
                                "popper-class": "no-arrow",
                                "popper-triggers": ["click"],
                                placement: "bottom-end"
                            }, {
                                popper: withCtx(function () {
                                    return [createBaseVNode("div", _hoisted_3$3, [createBaseVNode("button", {
                                        class: "flex items-center gap-2 rounded-md px3 py1 text-left hover:bg-gray/15",
                                        onClick: _cache[0] || (_cache[0] = function ($event) {
                                            return infoVisible.value = true;
                                        })
                                    }, _cache[6] || (_cache[6] = [createBaseVNode("i", {
                                        class: "i-ph:megaphone-bold"
                                    }, null, -1), createBaseVNode("span", {
                                        class: "op80"
                                    }, "关于", -1)])), _cache[8] || (_cache[8] = createBaseVNode("div", {
                                        class: "h-1px w-full bg-gray/20"
                                    }, null, -1)), createBaseVNode("button", {
                                        class: "flex items-center gap-2 rounded-md px3 py1 text-left hover:bg-red/10 hover:text-red-500",
                                        onClick: _cache[1] || (_cache[1] = function ($event) {
                                            return confirmLogoutVisible.value = true;
                                        })
                                    }, _cache[7] || (_cache[7] = [createBaseVNode("i", {
                                        class: "i-ph:sign-out-bold"
                                    }, null, -1), createBaseVNode("span", {
                                        class: "op80"
                                    }, "退出", -1)]))])];
                                }),
                                default: withCtx(function () {
                                    return [createBaseVNode("div", _hoisted_1$3, [createBaseVNode("span", {
                                        class: "max-w-30 truncate",
                                        title: unref(user).username || "无用户"
                                    }, toDisplayString(unref(user).username || "无用户"), 9, _hoisted_2$3), _cache[5] || (_cache[5] = createBaseVNode("i", {
                                        class: "i-ph:caret-down-fill ml-1"
                                    }, null, -1))])];
                                }),
                                _: 1
                            }), createVNode(_sfc_main$4, {
                                modelValue: unref(infoVisible),
                                "onUpdate:modelValue": _cache[2] || (_cache[2] = function ($event) {
                                    return isRef(infoVisible) ? infoVisible.value = $event : null;
                                })
                            }, null, 8, ["modelValue"]), createVNode(_component_SimpleDialog, {
                                modelValue: unref(confirmLogoutVisible),
                                "onUpdate:modelValue": _cache[4] || (_cache[4] = function ($event) {
                                    return isRef(confirmLogoutVisible) ? confirmLogoutVisible.value = $event : null;
                                }),
                                class: "flex flex-col gap-4 p-6 !w-400px"
                            }, {
                                default: withCtx(function () {
                                    return [_cache[11] || (_cache[11] = createBaseVNode("h2", {
                                        class: "flex items-center gap-2 text-1.1rem"
                                    }, [createBaseVNode("i", {
                                        class: "i-ph:warning-duotone text-2rem text-orange"
                                    }), createTextVNode(" 确认退出吗？ ")], -1)), createBaseVNode("div", _hoisted_4$2, [createVNode(_component_SimpleButton, {
                                        onClick: _cache[3] || (_cache[3] = function ($event) {
                                            return confirmLogoutVisible.value = false;
                                        })
                                    }, {
                                        default: withCtx(function () {
                                            return _cache[9] || (_cache[9] = [createTextVNode(" 取消 ")]);
                                        }),
                                        _: 1
                                    }), createVNode(_component_SimpleButton, {
                                        type: "primary",
                                        onClick: confirmLogout
                                    }, {
                                        default: withCtx(function () {
                                            return _cache[10] || (_cache[10] = [createTextVNode(" 确定 ")]);
                                        }),
                                        _: 1
                                    })])];
                                }),
                                _: 1
                            }, 8, ["modelValue"])], 64);
                        };
                    }
                });
                var _hoisted_1$2 = {
                    class: "relative h-12 flex-center flex-none bg-primary"
                };
                var _hoisted_2$2 = {
                    class: "absolute left-0 ml-4 h-full flex items-center text-xl text-white"
                };
                var _hoisted_3$2 = {
                    class: "absolute right-0 h-full flex items-center text-white"
                };
                var _sfc_main$2 = /* @__PURE__ */defineComponent({
                    __name: "index",
                    setup: function setup(__props) {
                        var appTitle = "模型及任务管理";
                        return function (_ctx, _cache) {
                            var _component_GradientText = _sfc_main$a;
                            return openBlock(), createElementBlock("section", _hoisted_1$2, [createBaseVNode("div", _hoisted_2$2, [_cache[0] || (_cache[0] = createBaseVNode("img", {
                                src: _imports_0,
                                class: "mr-2 h-8"
                            }, null, -1)), createVNode(_component_GradientText, {
                                "from-color": "white",
                                "to-color": "#ffffff99",
                                class: "whitespace-pre font-600"
                            }, {
                                default: withCtx(function () {
                                    return [createTextVNode(toDisplayString(unref(appTitle)), 1)];
                                }),
                                _: 1
                            })]), createVNode(_sfc_main$5), createBaseVNode("div", _hoisted_3$2, [createVNode(_sfc_main$3)])]);
                        };
                    }
                });
                var _hoisted_1$1 = {
                    key: 0,
                    class: "relative flex-center bg-white px-1rem",
                    style: {
                        "box-shadow": "0 0 5px #dedede"
                    }
                };
                var _hoisted_2$1 = {
                    class: "h-11 flex-center leading-11 space-x-2"
                };
                var _hoisted_3$1 = {
                    key: 0,
                    class: "h-4 w-1px bg-gray/30"
                };
                var _hoisted_4$1 = ["onClick"];
                var _sfc_main$1 = /* @__PURE__ */defineComponent({
                    __name: "SubMenu",
                    setup: function setup(__props) {
                        var _useMenu2 = useMenu(),
                            subMenuList = _useMenu2.subMenuList,
                            activeRouteName = _useMenu2.activeRouteName,
                            handleClick = _useMenu2.handleClick,
                            hasLeftMenu = _useMenu2.hasLeftMenu;
                        var appStore = useAppStore();
                        var _storeToRefs = storeToRefs(appStore),
                            leftMenuVisible = _storeToRefs.leftMenuVisible;
                        return function (_ctx, _cache) {
                            var _component_IconButton = _sfc_main$b;
                            return unref(subMenuList).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$1, [createBaseVNode("nav", _hoisted_2$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(subMenuList), function (submenu) {
                                var _submenu$meta;
                                return openBlock(), createElementBlock(Fragment, {
                                    key: submenu.name
                                }, [submenu.meta.divide ? (openBlock(), createElementBlock("div", _hoisted_3$1)) : createCommentVNode("", true), !submenu.meta.hidden && unref(hasPagePermission)(submenu === null || submenu === void 0 ? void 0 : submenu.name) ? (openBlock(), createElementBlock("div", {
                                    key: 1,
                                    class: normalizeClass(["h-8 flex-center cursor-pointer rounded hover:bg-hover px-0.6rem color-gray-600 font-500", {
                                        "!text-primary  !bg-primary/10": unref(activeRouteName).startsWith(submenu.name)
                                    }]),
                                    onClick: function onClick($event) {
                                        return unref(handleClick)(submenu);
                                    }
                                }, toDisplayString(((_submenu$meta = submenu.meta) === null || _submenu$meta === void 0 ? void 0 : _submenu$meta.title) || ""), 11, _hoisted_4$1)) : createCommentVNode("", true)], 64);
                            }), 128))]), unref(hasLeftMenu) ? (openBlock(), createBlock(_component_IconButton, {
                                key: 0,
                                "icon-class": ["text-1.2rem color-fade", unref(leftMenuVisible) ? "i-carbon:side-panel-close" : "i-carbon:side-panel-open"],
                                title: unref(leftMenuVisible) ? "收起" : "展开",
                                class: "absolute left-2 h-8 w-8",
                                onClick: _cache[0] || (_cache[0] = function ($event) {
                                    return leftMenuVisible.value = !unref(leftMenuVisible);
                                })
                            }, null, 8, ["icon-class", "title"])) : createCommentVNode("", true)])) : createCommentVNode("", true);
                        };
                    }
                });
                var _hoisted_1 = {
                    class: "h-screen min-w-1000px flex flex-col bg-#f2f4f6"
                };
                var _hoisted_2 = {
                    class: "flex flex-1 flex-col overflow-auto"
                };
                var _hoisted_3 = {
                    class: "flex flex-1 flex-col overflow-y-auto"
                };
                var _hoisted_4 = {
                    class: "flex flex-1 flex-col overflow-y-auto px-4 py-3"
                };
                var _sfc_main = exports("LayoutMain", /* @__PURE__ */defineComponent({
                    __name: "index",
                    setup: function setup(__props) {
                        var router = useRouter();
                        var currentRouterName = computed(function () {
                            return router.currentRoute.value.name;
                        });
                        return function (_ctx, _cache) {
                            var _component_RouterView = resolveComponent("RouterView");
                            var _component_Permission = _sfc_main$c;
                            return openBlock(), createElementBlock("section", _hoisted_1, [!unref(hasParentWindow) ? (openBlock(), createBlock(_sfc_main$2, {
                                key: 0
                            })) : createCommentVNode("", true), createBaseVNode("div", _hoisted_2, [createVNode(_sfc_main$1), createBaseVNode("div", _hoisted_3, [createBaseVNode("div", _hoisted_4, [createVNode(_component_Permission, {
                                page: unref(currentRouterName),
                                fullscreen: ""
                            }, {
                                default: withCtx(function () {
                                    return [createVNode(_component_RouterView)];
                                }),
                                _: 1
                            }, 8, ["page"])]), !unref(hasParentWindow) ? (openBlock(), createBlock(_sfc_main$6, {
                                key: 0
                            })) : createCommentVNode("", true)])])]);
                        };
                    }
                }));
            }
        };
    });
})();
